package net.entelijan.cobean.examples.showcase.bind.combobox;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JPanel;

import net.entelijan.cobean.examples.util.ExamplesUtil;
import net.entelijan.scf.DefaultShowcasePanel;
import net.miginfocom.swing.MigLayout;

public class ComboBoxPanel extends DefaultShowcasePanel {

	private JComboBox comboBox = new JComboBox();

	private JButton showSelectionButton = new JButton("Show Selection");

	private JButton select0Button = new JButton("Select Item 1");

	private JButton select3Button = new JButton("Select Item 3");
	private JButton setRestrictedButton = new JButton("> 1990");
	private JButton setAllButton = new JButton("All");

	private static final long serialVersionUID = 1L;

	public ComboBoxPanel() {
		super();

		// Set names of components. They are used for the automated testcases.
		comboBox.setName("comboBox");
		showSelectionButton.setName("showSelectionButton");
		select0Button.setName("select0Button");
		select3Button.setName("select3Button");
		setRestrictedButton.setName("setRestrictedButton");
		setAllButton.setName("setAllButton");

		setLayout(new MigLayout());
		add(comboBox, "w max, wrap");
		add(new JPanel(), "h max, wrap");
		add(ExamplesUtil.createButtonsPanel(130, this.showSelectionButton,
				this.select0Button, this.select3Button, this.setAllButton,
				this.setRestrictedButton));
	}

	public JComboBox getComboBox() {
		return comboBox;
	}

	public void setComboBox(JComboBox comboBox) {
		this.comboBox = comboBox;
	}

	public JButton getShowSelectionButton() {
		return showSelectionButton;
	}

	public void setShowSelectionButton(JButton showSelectionButton) {
		this.showSelectionButton = showSelectionButton;
	}

	public JButton getSelect0Button() {
		return select0Button;
	}

	public void setSelect0Button(JButton select0Button) {
		this.select0Button = select0Button;
	}

	public JButton getSelect3Button() {
		return select3Button;
	}

	public void setSelect3Button(JButton select3Button) {
		this.select3Button = select3Button;
	}

	public JButton getSetRestrictedButton() {
		return setRestrictedButton;
	}

	public void setSetRestrictedButton(JButton setRomanLanguagesButton) {
		this.setRestrictedButton = setRomanLanguagesButton;
	}

	public JButton getSetAllButton() {
		return setAllButton;
	}

	public void setSetAllButton(JButton setAllLanguagesButton) {
		this.setAllButton = setAllLanguagesButton;
	}

}
